<% content_for :sidebar do %>

<div class="block">
    <h3 class="folderList">フォルダリスト</h3>
    <ul class="navigation">
      <li><%= link_to "送信箱", portal_message_outbox_index_path %></li>
      <li><%= link_to "すべて", portal_messages_path %></li>
      <% @folders.each do |folder| %>
        <li><%= link_to folder.name, portal_messages_path(:folder_id => folder.id) %></li>
      <% end %>
    </ul>
    <div class="content">
      <div class="inner">
        <div class="sns_control_box">
          <%= link_to "フォルダ一覧", portal_message_folders_path %>
        </div>
      </div>
    </div>
  </div>

  <div class="block">
    <h3 class="ruleControl">振り分けルール管理</h3>
    <ul class="navigation">
      <li><%= link_to "ルール一覧", portal_message_rules_path %></li>
    </ul>
    <div class="content">
      <div class="inner">
        <div class="sns_control_box">
          <%= link_to "新規ルール作成", new_portal_message_rule_path %>
        </div>
      </div>
    </div>
  </div>
<% end %>

<div class="block">
  <div class="content">
    <div class="inner">
      <%= link_to "新規メッセージ作成", new_portal_message_path, :class => "newMessagesButton" %>
      <h2 class="title"><%= @user.nick_name %>のメッセージボックス</h2>
      <%= render :partial => "messages", :locals => {:messages => @messages} %>
    </div>
  </div>
</div>

